package lambda;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Random;
import java.util.UUID;

/**
 * @author zhangxin
 * @date 2020/9/27
 */
public class Test {

    int i;
    public Test(int i ) {
        this.i = i;
    }

    @Override
    public String toString() {
        return "Test{" +
                "i=" + i +
                '}';
    }

    public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {


        Constructor<Test> constructor = Test.class.getConstructor();
        Test test = constructor.newInstance("1");

        System.out.println(test);


        //MyForEach<String> stringMyForEach = new MyForEach<>();
        MyForEach stringMyForEach = new MyForEach();
        stringMyForEach.setT("java");

        stringMyForEach.test(System.out::println);


        System.out.println(UUID.randomUUID().toString());
        System.out.println(UUID.randomUUID().toString());
        System.out.println(UUID.randomUUID().toString());
    }

}

